﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Perceiveit.Xml.Converters
{

    #region public class LongXConverter : XConverter<long>

    public class LongXConverter : XConverter<long>
    {
        public override long FromString(string value)
        {
            long v;
            if (string.IsNullOrEmpty(value) || !long.TryParse(value, out v))
                v = 0;

            return v;
        }

        public override string ToString(long value)
        {
            return value.ToString();
        }
    }

    #endregion
}
